<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>资讯</title>
	<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style" />
	<meta content="telephone=no" name="format-detection" />
	<!-- 引入核心样式 -->
	<link href="http://appimg.yinsoso.com/css/weui.min.css" rel="stylesheet">
		<link href="http://appimg.yinsoso.com/css/jquery-weui.css" rel="stylesheet">
		<link href="http://appimg.yinsoso.com/css/public.css" rel="stylesheet">
		<link href="http://appimg.yinsoso.com/css/style-min.css" rel="stylesheet">
		
	<!--当前页面的css-->
	<link href="http://appimg.yinsoso.com/css/swiper-3.3.1.min.css" rel="stylesheet"/>
	<link href="css/college.css" rel="stylesheet">
	<link href="css/association.css" rel="stylesheet">
	<link href="css/recruit.css" rel="stylesheet">
	<link href="css/news.css" rel="stylesheet">
	<link href="css/newsRecommend.css" rel="stylesheet">
	<!-- 引入核心JS -->
	<script src="http://appimg.yinsoso.com/js/vue.min.js"></script>
	<script src="http://appimg.yinsoso.com/js/3.2.0-jquery.min.js"></script>
	<script src="http://appimg.yinsoso.com/js/jquery-weui.min.js"></script>
	<script src="http://appimg.yinsoso.com/js/index.min.js"></script>
	<script src="http://appimg.yinsoso.com/js/fastclick.min.js"></script>
	<script type="text/javascript" src="http://appimg.yinsoso.com/js/swiper-3.3.1.min.js" ></script>    
	<script src="http://appimg.yinsoso.com/js/common.js" type="text/javascript" ></script>
	<style>
		.coll-main li {
			border-top: inherit;
		}

		.coll-main li:first-child {
			border-top: .01rem solid #ededed;
		}
	</style>
</head>

<body>
	<div id="app">
		<div class="recruit">
			<div class="rec-classify">
				<!--默认 最新资讯选中-->
				<template v-for="(item,index) in type">
					<a :class="{'rec-active':types == item.type}" @click="tabChange(item.type)">{{item.name}}</a>
					<span v-if="index==0"></span>
				</template>
			</div>
		</div>
		<div class="college">
			<div class="buyBanner">
				<!-- Swiper banner-->
				<div class="swiper-container">
					<div class="swiper-wrapper" id="newSwiper">
						<!-- <div class="swiper-slide" v-for="(item, index) in bannerImg" :key="index">
							<img :src="item.img" alt="">
						</div> -->
					</div>
					<!-- Add Pagination -->
					<div class="swiper-pagination"></div>
				</div>
			</div>
			<!-- 最新资讯-->
			<div v-show="isShow">
				<!-- 筛选条件-->
				<div id="tabs" v-bind:class="{'top-add':topStatus}">
					<div class="swiper-tabs">
						<div class="swiper-wrapper" id="newsTabs">
							<div class="swiper-slide tab" :class="[{ active:Type == item.id}]" v-for="(item, index) in tabs" :key="index" @click="tab(item.id)">
								{{item.name}}
							</div>
						</div>
					</div>
				</div>

				<!--最新资讯-->
				<ul class="coll-main asso-main weui-tab__bd-item" id="newsList">
					<!--  -->
					<li class="clearfix" v-for="(item,index) in listTab" @click="urlHref(item)">
						<div class="coll-main-li">
							<div class="coll-left">
								<img :src="item.head_img" />
							</div>
							<div class="coll-right">
								<p>{{item.title}}</p>
								<div class="coll-right-bot">
									<div class="coll-source">{{item.city_name}}</div>
									<div class="coll-browse">
										<img src="../images/eye.jpg" />
										<span>{{item.read_num}}</span>&nbsp;&nbsp;&nbsp;&nbsp;
									</div>
									<div class="coll-browse">
										<span>{{item.create_date}}</span>
									</div>
								</div>
							</div>
						</div>
					</li>
				</ul>
			</div>
			<!--推荐资讯数据列表-->
			<div class="newsRecommend gray_bg weui-tab__bd-item" style="padding-bottom: 1rem" v-show="!isShow">
				<ul id="recommendLists">
					<li v-for="(item,index) in parentData">
						<template v-for="(itemt,index2) in item" v-if="index2==0">
							<div class="news-time">{{itemt.create_time}}</div>
						</template>
						<div class="news-main">
							<template v-for="(itemt,index2) in item" v-if="index2==0">
								<div class="news-main-top" @click="goHeadUrl(itemt)">
									<div class="img">
										<img :src="itemt.head_img">
									</div>
									<div class="txt">
										<a>{{itemt.title}}</a>
									</div>
								</div>
							</template>
							<ul>
								<li v-for="(items,indexs) in item" @click="urlHref_li(items)" v-if="indexs!=0">
									<a>
										<p>{{items.title}}</p>
									</a>
									<div class="pic">
										<img :src="items.head_img">
									</div>
								</li>
							</ul>
						</div>
					</li>
				</ul>
			</div>
			<div class="weui-loadmore" v-if="!hideing">
				<i class="weui-loading"></i>
				<span class="weui-loadmore__tips">正在加载</span>
			</div>
		</div>


	</div>
	<!--当前页面的js-->
	<script src="js/news.js"></script>

	<script>
		//路径跳转
		function BannerurlHref(id, url_type, types,cityId) {
			console.log(id,url_type,types,cityId)
			var userId = $.getPara("userId");
			var cityId = cityId;///cityId
			var para = {};
			if (types == 1) {
				para.title = "动态详情";
			} else if (types == 2) {
				para.title = "资讯推荐详情";
			}
			/*
			轮播图跳转类型编号规则：
				- 0不跳转
				- 1资讯
				- 2展会
				- 3印厂
				- 4设备
				- 5招聘公司
				- 6媒体
				- 7协会
				- 8学院
				- 9视频
				- 10招聘职位
				- 11求购
				- 12供应
				- 13故事与会议
				- 14秒杀商品详情
				- 15活动
				- 16二手
				- 17动态
				- 18心情
			*/
			//资讯、动态详情都是用的subDynamicDetails.html
			if (url_type == 1 || url_type == 17) {
				para.type = "newsDetails";
				para.url = '/PageClassify/html/Substation/Dynamic/subDynamicDetails.html?id=' + id+"&cityId="+cityId;
				if (userId > 0) {
					para.url = '/PageClassify/html/Substation/Dynamic/subDynamicDetails.html?id=' + id + '&userId=' + userId+"&cityId="+cityId;
				}
			} else//防止出现其他类型的跳转
			{
				para.type = "news";
				para.url = '/template/news.html?id=' + id+"&cityId="+cityId;
				if (userId > 0) {
					para.url = '/template/news.html?id=' + id + '&userId=' + userId+"&cityId="+cityId;
				}
			}

			// window.location.href =para.url;	
			if (/(Android)/i.test(navigator.userAgent)) { //判断Android
				//是android系统  目前协议 安卓只能传字符串过去
				// alert("Android系统");
				jsAndroid.appPush(JSON.stringify(para))
				// jsAndroid.appPush("123456")
			} else if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { //判断iPhone|iPad|iPod|iOS
				//默认为iOS系统   
				window.webkit.messageHandlers.appPush.postMessage(para);
			} else {
				//pc
				window.location.href = para.url;
				alert("PC浏览器");
			};
		}
	</script>
</body>

</html>